package com.xing.dao;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.xing.core.BaseDao;
import com.xing.entity.AuthenticationEntity;
import org.apache.ibatis.annotations.*;

/**
 * @version 1.0
 * @Author Xing
 * @Date 2024/4/19 21:10
 */
@Mapper
public interface AuthenticationDao extends BaseDao<AuthenticationEntity> {

    @Insert("INSERT live_identity_authentication values (#{entity.id},#{entity.realName}," +
            "#{entity.idCard},#{entity.address},#{entity.frontalView},#{entity.reverseView}," +
            "#{entity.delFlag},#{entity.sex})")
    public Long Save(@Param("entity") AuthenticationEntity entity);

    @Select("SELECT id FROM live_identity_authentication WHERE id_card = #{idCard} AND  AND del_flag = 0;")
    public Long getAuthenticationId(@Param("idCard") String idCard);
}
